package com.example.kotlindemo.`interface`

import androidx.compose.ui.text.capitalize
import java.lang.reflect.Constructor


//class User(val nickname: String){
//    var age = "luge"
//        get() = field.capitalize()
//        set(value) {
//           field = value.trim()
//        }
//    //自定义的filed
//}
//
//class Test(_name:String,
//           _age:Int,sex:String){
//
////    constructor(name: String):this(name, _age = 10)
////
////    constructor(sex: String):this(sex, _age = 10){}
////
//
//}

//class User(var name:String){
////    var age:String
//    init {
//       print("ss")
//    require(name.isBlank())
//    }
//}


class Student(
    _name:String,
    val age:Int
){
    lateinit var equipment:String
    var name = _name
    var score = 100
    private val bobby = "music"
    val subject:String

    init {
        println("init....")
        subject = "math"
    }

    constructor(_name: String):this(_name, 100){
        score = 20
    }

    fun isLoad(){
        if(::equipment.isInitialized) println("")
    }
}




fun main() {
    var s = Student("luge")
//    s is Any

}